/*
 * Project: BoboDesignPattern
 * 
 * File Created at 2019年12月27日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package test.practice;

/**
 * @Type A20191227__builder
 * @Desc
 * @author 52489
 * @date 2019年12月27日
 * @Version V1.0
 */
public class A20191227__builder {

    public static void main(String[] args) {
        A20191227__builder aBuilder = new A20191227__builder.Builder().setP1("11").setP2("22").build();
        System.out.println(aBuilder.getP1());
        ;
    }

    private String p1;
    private String p2;
    private String p3;

    /**
     * @param p1
     * @param p2
     * @param p3
     */
    public A20191227__builder(String p1, String p2, String p3) {
        super();
        this.p1 = p1;
        this.p2 = p2;
        this.p3 = p3;
    }

    /**
     * 
     */
    public A20191227__builder() {
    }

    private A20191227__builder(Builder builder) {
        this.p1 = builder.p1;
        this.p2 = builder.p2;
        this.p3 = builder.p3;
    }

    public String getP1() {
        return p1;
    }

    public void setP1(String p1) {
        this.p1 = p1;
    }

    public String getP2() {
        return p2;
    }

    public void setP2(String p2) {
        this.p2 = p2;
    }

    public String getP3() {
        return p3;
    }

    public void setP3(String p3) {
        this.p3 = p3;
    }

    public static class Builder {
        private String p1;
        private String p2;
        private String p3;

        /**
         * @param p1
         * @param p2
         * @param p3
         */
        public Builder(String p1, String p2, String p3) {
            super();
            this.p1 = p1;
            this.p2 = p2;
            this.p3 = p3;
        }

        public Builder() {
        }

        public String getP1() {
            return p1;
        }

        public Builder setP1(String p1) {
            this.p1 = p1;
            return this;
        }

        public String getP2() {
            return p2;
        }

        public Builder setP2(String p2) {
            this.p2 = p2;
            return this;
        }

        public String getP3() {
            return p3;
        }

        public Builder setP3(String p3) {
            this.p3 = p3;
            return this;
        }

        A20191227__builder build() {
            return new A20191227__builder(this);
        }

    }

}
